// ============================================================================
//
// LCP-net framework by Pierre CHATEL chatelp@gmail.com
// Distributed under GPLv3
// Copyright (C) THALES Land & Joint Systems, 2008, 2009. All rights reserved
//
// ============================================================================

/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package com.thalesgroup.preferenceFramework.models.LCPnet.fragments.impl;

import com.thalesgroup.preferenceFramework.models.LCPnet.fragments.*;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EFactoryImpl;

import org.eclipse.emf.ecore.plugin.EcorePlugin;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class FragmentsFactoryImpl extends EFactoryImpl implements FragmentsFactory {
	/**
	 * Creates the default factory implementation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static FragmentsFactory init() {
		try {
			FragmentsFactory theFragmentsFactory = (FragmentsFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.thalesgroup.com/preferenceFramework/models/lcpnet/fragments"); 
			if (theFragmentsFactory != null) {
				return theFragmentsFactory;
			}
		}
		catch (Exception exception) {
			EcorePlugin.INSTANCE.log(exception);
		}
		return new FragmentsFactoryImpl();
	}

	/**
	 * Creates an instance of the factory.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public FragmentsFactoryImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EObject create(EClass eClass) {
		switch (eClass.getClassifierID()) {
			case FragmentsPackage.LC_PNET_FRAGMENT: return createLCPnetFragment();
			case FragmentsPackage.LNODE_FRAGMENT: return createLNodeFragment();
			case FragmentsPackage.CLPT_FRAGMENT: return createCLPTFragment();
			case FragmentsPackage.CLPT_LINE_FRAGMENT: return createCLPTLineFragment();
			case FragmentsPackage.LNODE_VALUE_FRAGMENT: return createLNodeValueFragment();
			case FragmentsPackage.LNODE_VALUE_UTILITY_FRAGMENT: return createLNodeValueUtilityFragment();
			case FragmentsPackage.ARC_FRAGMENT: return createArcFragment();
			case FragmentsPackage.CI_ARC_FRAGMENT: return createCIArcFragment();
			case FragmentsPackage.CIT_FRAGMENT: return createCITFragment();
			case FragmentsPackage.CIT_LINE_FRAGMENT: return createCITLineFragment();
			case FragmentsPackage.LINGUISTIC_DOMAIN_FRAGMENT: return createLinguisticDomainFragment();
			case FragmentsPackage.LINGUISTIC_SUBSET_FRAGMENT: return createLinguisticSubsetFragment();
			default:
				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public LCPnetFragment createLCPnetFragment() {
		LCPnetFragmentImpl lcPnetFragment = new LCPnetFragmentImpl();
		return lcPnetFragment;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public LNodeFragment createLNodeFragment() {
		LNodeFragmentImpl lNodeFragment = new LNodeFragmentImpl();
		return lNodeFragment;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CLPTFragment createCLPTFragment() {
		CLPTFragmentImpl clptFragment = new CLPTFragmentImpl();
		return clptFragment;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CLPTLineFragment createCLPTLineFragment() {
		CLPTLineFragmentImpl clptLineFragment = new CLPTLineFragmentImpl();
		return clptLineFragment;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public LNodeValueFragment createLNodeValueFragment() {
		LNodeValueFragmentImpl lNodeValueFragment = new LNodeValueFragmentImpl();
		return lNodeValueFragment;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public LNodeValueUtilityFragment createLNodeValueUtilityFragment() {
		LNodeValueUtilityFragmentImpl lNodeValueUtilityFragment = new LNodeValueUtilityFragmentImpl();
		return lNodeValueUtilityFragment;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ArcFragment createArcFragment() {
		ArcFragmentImpl arcFragment = new ArcFragmentImpl();
		return arcFragment;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CIArcFragment createCIArcFragment() {
		CIArcFragmentImpl ciArcFragment = new CIArcFragmentImpl();
		return ciArcFragment;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CITFragment createCITFragment() {
		CITFragmentImpl citFragment = new CITFragmentImpl();
		return citFragment;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CITLineFragment createCITLineFragment() {
		CITLineFragmentImpl citLineFragment = new CITLineFragmentImpl();
		return citLineFragment;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public LinguisticDomainFragment createLinguisticDomainFragment() {
		LinguisticDomainFragmentImpl linguisticDomainFragment = new LinguisticDomainFragmentImpl();
		return linguisticDomainFragment;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public LinguisticSubsetFragment createLinguisticSubsetFragment() {
		LinguisticSubsetFragmentImpl linguisticSubsetFragment = new LinguisticSubsetFragmentImpl();
		return linguisticSubsetFragment;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public FragmentsPackage getFragmentsPackage() {
		return (FragmentsPackage)getEPackage();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @deprecated
	 * @generated
	 */
	@Deprecated
	public static FragmentsPackage getPackage() {
		return FragmentsPackage.eINSTANCE;
	}

} //FragmentsFactoryImpl
